<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
	<head>
		<base href="<%=basePath%>"/>
		<meta charset="utf-8" />
		<title>商品详情</title>
		<style type="text/css">
		table{
			width:100%;
			border-collapse:collapse;
		}
		table tr{
			border:1px solid #B5CFD9;
			text-align: center;
		}
		table td{
			border:1px solid #B5CFD9;
			text-align: center;
			
			
		}
		h3{
			text-align:center;
		}
		input{
				float:right;
				margin-top:20px;
				color:#fff;
				background-color:#B87354;
				padding-right:10px;
				cursor: pointer;
				border:0px;
				border-radius:5px;
				width:80px;
				height:30px;	
			}
			input:hover{
				background-color: #AA895E;
			}
		</style>
		<script type="text/javascript" src="js/jquery.min.js"></script>	
		<script type="text/javascript">
			function del(ts,id){
				$.post("deletefindshopping.shtml",{"id":id},function(date){
					if(date=="true"){
						alert("删除成功");
						$(ts).parent().parent().parent().remove();
					}else{
						alert("删除失败");
					}
				})
				
				
			}
		</script>		
</head>
<body>
<%@ include file="/HT/login_control.jsp" %>
	<div id="hezi">
		<input type="hidden" name="daid" value="${id }">
		<h3>${sessionScope.name}</h3>
			<table> 
				<tr>
					<td>图片</td>
					<td>名称</td>
					<td>颜色</td>
					<td>价格</td>
					<td>数量</td>
					<td>尺码</td>
					<td>操作</td>
				</tr>
				<c:forEach items="${findlist }" var="find">
					<tr>
							<td style="padding-top:10px">
								<c:forTokens items="${find.sc_bigimages }" delims="," var="scbig">
									<img src="HT/images/shopping/${scbig }" width="50px">&emsp;
								</c:forTokens>	
							</td>
						<td>${find.sc_name }</td>
						<td>${find.color }</td>
						<td>${find.sc_price }</td>
						<td>${find.sc_totalnum }</td>
						<td>${find.sc_size }</td>
						<td class="delete"><a href="javascript:void(0)"><span onclick="del(this,${find.sc_id})">删除</span></a><a href="updatespxq.shtml?id=${find.sc_id }&&name=${sessionScope.name}&&daid=${id}">修改</a></td>
					</tr>
				</c:forEach>
			</table>
			<a href="HT/HTaddspxq.jsp?name=${sessionScope.name}&&daid=${id}"><input type="button" value="添加"></a>
		</div>
</body>
</html>